package com.yunyao.web.controller;


import com.yunyao.common.dto.PaymentHistoryDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.dao.model.BamuPaymentHistory;
import com.yunyao.dao.service.bamu.IBamuPaymentHistoryService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@RestController
@RequestMapping("/payment/history")
public class PaymentHistoryController {


    @Resource
    private IBamuPaymentHistoryService paymentHistoryService;


    @PostMapping("/pageList")
    public YResult<PageResult<BamuPaymentHistory>> pageList(@RequestBody @Valid @NotNull PaymentHistoryDto dto) {
        return YResult.success(paymentHistoryService.pageList(dto));
    }

}
